<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>testcase.js (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
  </script>

  <script src="static/js/doc.js">
  </script>

  <meta charset="utf8">
</head>

<body onload="prettyPrint()">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
       <span class="fn">testcase.js</span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    A class representing a set of test functions to be run.

 Testing code should not have dependencies outside of goog.testing so as to
 reduce the chance of masking missing dependencies.

 This file does not compile correctly with --collapse_properties. Use
 --property_renaming=ALL_UNQUOTED instead.
  </div>
  

        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="closure_goog_testing_testcase.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
          </ol>
        </div>
</div>

<h2 class="g-first">File Location</h2>
  <div class="g-section g-tpl-20-80">
    <div class="g-unit g-first">
      <div class="g-c-cell code-label">testing/testcase.js</div>
    </div>
  </div>
<hr/>


  <h2>Classes</h2>
 <div class="fn-constructor">
        <a href="class_goog_testing_TestCase.html">
          goog.testing.TestCase</a><br/>
        <div class="class-details">A class representing a JsUnit test case.  A TestCase is made up of a number
of test functions which can be run.  Individual test cases can override the
following functions to set up their test environment:
- runTests - completely override the test&#39;s runner
- setUpPage - called before any of the test functions are run
- tearDownPage - called after all tests are finished
- setUp - called before each of the test functions
- tearDown - called after each of the test functions

Use {@link #autoDiscoverTests}</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_testing_TestCase_Test.html">
          goog.testing.TestCase.Test</a><br/>
        <div class="class-details">A class representing a single test function.</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_testing_TestCase_Result.html">
          goog.testing.TestCase.Result</a><br/>
        <div class="class-details">A class for representing test results.  A bag of public properties.</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_testing_TestCase_Error.html">
          goog.testing.TestCase.Error</a><br/>
        <div class="class-details">A class representing an error thrown by the test</div>
 </div>
      
<br/>

  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>


  <h2>Global Functions</h2>





<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.testing.TestCase.protectedTimeout_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.testing.TestCase.</span><span class="entryName">protectedTimeout_<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Save a reference to window.timeout, so any code that overrides the default
behavior (e.g. MockClock) doesn&#39;t affect our runner.
     </div>

   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_testcase.js.source.html#line144">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>



  <h2>Global Properties</h2>





<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.testing.TestCase.IS_IE"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.testing.TestCase.</span><span class="entryName">IS_IE</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span></div>
     </div>


     <div class="entryOverview">
       Avoid a dependency on goog.userAgent and keep our own reference of whether
the browser is IE.
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_testing_testcase.js.source.html#line170">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>





  <a name="goog.testing.TestCase.MAX_RUN_TIME"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.testing.TestCase.</span><span class="entryName">MAX_RUN_TIME</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
     </div>


     <div class="entryOverview">
       The maximum amount of time that the test can run before we force it to be
async.  This prevents the test runner from blocking the browser and
potentially hurting the Selenium test harness.
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_testing_testcase.js.source.html#line128">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.testing.TestCase.setTimeoutAsString_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.testing.TestCase.</span><span class="entryName">setTimeoutAsString_</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
     </div>


     <div class="entryOverview">
       Saved string referencing window.setTimeout&#39;s string serialization.  IE
sometimes fails to uphold equality for setTimeout, but the string version
stays the same.
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_testing_testcase.js.source.html#line154">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>



      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Directory testing</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">File Reference</h2>
            <div id="sideFileIndex" rootPath="closure/goog" current="testing/testcase.js"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
